inherited frmBillRelation: TfrmBillRelation
  Left = 430
  Top = 173
  BorderStyle = bsSizeable
  Caption = #34987#24341#29992#36807#31243
  ClientHeight = 393
  ClientWidth = 752
  ExplicitWidth = 768
  ExplicitHeight = 432
  PixelsPerInch = 96
  TextHeight = 12
  inherited Panel1: TPanel
    Width = 752
    ExplicitWidth = 752
    inherited labFuncDesc: TLabel
      Left = 221
      Caption = #24341#29992#36807#31243
      ExplicitLeft = 221
    end
    inherited img3: TImage
      Left = 794
      ExplicitLeft = 595
    end
    inherited Bevel1: TBevel
      Width = 752
      ExplicitWidth = 646
    end
  end
  inherited pnlBottom: TPanel
    Top = 338
    Width = 752
    TabOrder = 2
    ExplicitTop = 338
    ExplicitWidth = 752
    inherited bvl1: TBevel
      Width = 752
      ExplicitWidth = 646
    end
    inherited btnOK: TcxButton
      Left = 578
      Caption = #21333#25454'(&O)'
      ModalResult = 0
      OnClick = btnOKClick
      ExplicitLeft = 578
    end
    inherited btnCancel: TcxButton
      Left = 665
      ExplicitLeft = 665
    end
    object btnRefresh: TcxButton
      Left = 11
      Top = 9
      Width = 75
      Height = 25
      Anchors = [akLeft, akBottom]
      Caption = #21047#26032'(&R)'
      OptionsImage.Glyph.SourceDPI = 96
      OptionsImage.Glyph.Data = {
        424D560A00000000000036000000280000002400000012000000010020000000
        000000000000C40E0000C40E0000000000000000000000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        800000808000FFFFFFFF00808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        80000080800000808000800000FF800000FF0080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        800000808000008080000080800000808000808080FF808080FFFFFFFFFF0080
        8000008080000080800000808000008080000080800000808000008080000080
        80000080800000808000008080000080800000808000800000FF008000FF0080
        00FF800000FF0080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080008080
        80FF0080800000808000808080FFFFFFFFFF0080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000800000FF008000FF008000FF008000FF008000FF800000FF008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        80000080800000808000808080FF008080000080800000808000008080008080
        80FFFFFFFFFF0080800000808000008080000080800000808000008080000080
        8000008080000080800000808000800000FF008000FF008000FF008000FF0080
        00FF008000FF008000FF800000FF008080000080800000808000008080000080
        80000080800000808000008080000080800000808000808080FF008080000080
        800000808000008080000080800000808000808080FFFFFFFFFF008080000080
        8000008080000080800000808000008080000080800000808000800000FF0080
        00FF008000FF008000FF00FF00FF008000FF008000FF008000FF008000FF8000
        00FF008080000080800000808000008080000080800000808000008080000080
        8000808080FFFFFFFFFF0080800000808000808080FFFFFFFFFF008080000080
        800000808000808080FFFFFFFFFF008080000080800000808000008080000080
        80000080800000808000008000FF008000FF008000FF00FF00FF0080800000FF
        00FF008000FF008000FF008000FF800000FF0080800000808000008080000080
        800000808000008080000080800000808000808080FFFFFFFFFF008080008080
        80FF00808000808080FFFFFFFFFF0080800000808000808080FFFFFFFFFF0080
        800000808000008080000080800000808000008080000080800000FF00FF0080
        00FF00FF00FF00808000008080000080800000FF00FF008000FF008000FF0080
        00FF800000FF0080800000808000008080000080800000808000008080000080
        8000808080FFFFFFFFFF808080FF008080000080800000808000808080FFFFFF
        FFFF0080800000808000808080FFFFFFFFFF0080800000808000008080000080
        800000808000008080000080800000FF00FF0080800000808000008080000080
        80000080800000FF00FF008000FF008000FF008000FF800000FF008080000080
        80000080800000808000008080000080800000808000808080FF008080000080
        8000008080000080800000808000808080FFFFFFFFFF00808000008080008080
        80FFFFFFFFFF0080800000808000008080000080800000808000008080000080
        800000808000008080000080800000808000008080000080800000FF00FF0080
        00FF008000FF008000FF800000FF008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000808080FFFFFFFFFF0080800000808000808080FFFFFFFFFF008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        800000808000008080000080800000FF00FF008000FF008000FF008000FF8000
        00FF008080000080800000808000008080000080800000808000008080000080
        80000080800000808000008080000080800000808000808080FFFFFFFFFF0080
        800000808000808080FFFFFFFFFF008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        800000FF00FF008000FF008000FF008000FF800000FF00808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        80000080800000808000808080FFFFFFFFFF0080800000808000808080FFFFFF
        FFFF008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000FF00FF008000FF0080
        00FF008000FF800000FF00808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080008080
        80FFFFFFFFFF0080800000808000808080FFFFFFFFFF00808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000FF00FF008000FF008000FF800000FF008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        800000808000008080000080800000808000808080FFFFFFFFFF008080008080
        80FFFFFFFFFF0080800000808000008080000080800000808000008080000080
        80000080800000808000008080000080800000808000008080000080800000FF
        00FF008000FF008000FF00808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        800000808000808080FFFFFFFFFF808080FF0080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        80000080800000808000008080000080800000FF00FF00808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000808080FF0080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        8000008080000080800000808000008080000080800000808000008080000080
        80000080800000808000008080000080800000808000}
      OptionsImage.NumGlyphs = 2
      TabOrder = 2
      OnClick = btnRefreshClick
    end
    object chkFullBill: TcxCheckBox
      Left = 97
      Top = 11
      Caption = #26174#31034#25972#21333
      Properties.OnChange = chkFullBillPropertiesChange
      TabOrder = 3
      Transparent = True
    end
  end
  object Panel2: TPanel
    Left = 0
    Top = 25
    Width = 752
    Height = 313
    Align = alClient
    BevelOuter = bvNone
    TabOrder = 1
    object grdRelation: TcxGrid
      Left = 248
      Top = 0
      Width = 504
      Height = 313
      Align = alClient
      TabOrder = 0
      object RelationView: TcxGridDBTableView
        OnDblClick = RelationViewDblClick
        Navigator.Buttons.CustomButtons = <>
        DataController.DataModeController.SmartRefresh = True
        DataController.DataSource = dsRelation
        DataController.Summary.DefaultGroupSummaryItems = <
          item
            Kind = skSum
            FieldName = 'quantity'
            Column = RelationViewQuantity
          end
          item
            Kind = skSum
            FieldName = 'amount'
            Column = RelationViewAmount
          end>
        DataController.Summary.FooterSummaryItems = <
          item
            Kind = skSum
            Column = RelationViewQuantity
          end
          item
            Kind = skSum
            FieldName = 'amount'
            Column = RelationViewAmount
          end>
        DataController.Summary.SummaryGroups = <
          item
            Links = <
              item
                Column = RelationViewQuantity
              end>
            SummaryItems = <
              item
                Column = RelationViewBName
              end>
          end>
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsView.ColumnAutoWidth = True
        OptionsView.Footer = True
        Styles.Background = MainDM.bslBackGroup
        Styles.ContentEven = MainDM.bsEven
        Styles.ContentOdd = MainDM.bsOdd
        Styles.Footer = MainDM.bsTitle
        Styles.Group = MainDM.bsTitle
        Styles.GroupByBox = MainDM.bsTitle
        Styles.Header = MainDM.bsTitle
        Styles.Selection = MainDM.bsSelect
        object RelationViewBName: TcxGridDBColumn
          Caption = #21333#25454#21517#31216
          DataBinding.FieldName = 'bname'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Visible = False
          GroupIndex = 0
          HeaderAlignmentHorz = taCenter
          Width = 98
        end
        object RelationViewBcode: TcxGridDBColumn
          Caption = #21333#25454#32534#21495
          DataBinding.FieldName = 'm_bcode'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          HeaderAlignmentHorz = taCenter
          Width = 122
        end
        object RelationViewQuantity: TcxGridDBColumn
          Caption = #25968#37327
          DataBinding.FieldName = 'quantity'
          PropertiesClassName = 'TcxCurrencyEditProperties'
          Properties.AssignedValues.DisplayFormat = True
          Properties.DecimalPlaces = 4
          Properties.ReadOnly = True
          HeaderAlignmentHorz = taCenter
          Width = 74
        end
        object RelationViewAmount: TcxGridDBColumn
          Caption = #37329#39069
          DataBinding.FieldName = 'amount'
          PropertiesClassName = 'TcxCurrencyEditProperties'
          Properties.AssignedValues.DisplayFormat = True
          Properties.DecimalPlaces = 2
          Properties.ReadOnly = True
          HeaderAlignmentHorz = taCenter
          Width = 98
        end
        object RelationViewRemark: TcxGridDBColumn
          Caption = #22791#27880
          DataBinding.FieldName = 'remark'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          HeaderAlignmentHorz = taCenter
          Width = 128
        end
      end
      object SuramtView: TcxGridDBTableView
        Navigator.Buttons.CustomButtons = <>
        DataController.DataModeController.SmartRefresh = True
        DataController.DataSource = dsSuramt
        DataController.Summary.DefaultGroupSummaryItems = <
          item
            Kind = skSum
            Column = SuramtViewneedbalamt
          end
          item
            Kind = skSum
            Column = SuramtViewbaledamt
          end
          item
            Kind = skSum
            Column = SuramtViewbamount
          end>
        DataController.Summary.FooterSummaryItems = <
          item
            Kind = skSum
            FieldName = 'bamount'
            Column = SuramtViewbamount
          end
          item
            Kind = skSum
            FieldName = 'baledamt'
            Column = SuramtViewbaledamt
          end
          item
            Kind = skSum
            FieldName = 'needbalamt'
            Column = SuramtViewneedbalamt
          end>
        DataController.Summary.SummaryGroups = <>
        OptionsBehavior.FocusCellOnTab = True
        OptionsBehavior.GoToNextCellOnEnter = True
        OptionsBehavior.FocusCellOnCycle = True
        OptionsData.Deleting = False
        OptionsData.DeletingConfirmation = False
        OptionsData.Editing = False
        OptionsData.Inserting = False
        OptionsView.Footer = True
        OptionsView.GroupByBox = False
        Styles.Background = MainDM.bslBackGroup
        Styles.ContentEven = MainDM.bsEven
        Styles.ContentOdd = MainDM.bsOdd
        Styles.Footer = MainDM.bsTitle
        Styles.Header = MainDM.bsTitle
        Styles.Selection = MainDM.bsSelect
        object SuramtViewm_bname: TcxGridDBColumn
          Caption = #21333#25454#21517#31216
          DataBinding.FieldName = 'm_bname'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 80
        end
        object SuramtViewm_bcode: TcxGridDBColumn
          Caption = #21333#25454#32534#30721
          DataBinding.FieldName = 'm_bcode'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 100
        end
        object SuramtViewmoneyname: TcxGridDBColumn
          Caption = #24065#31181
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 50
        end
        object SuramtViewbamount: TcxGridDBColumn
          Caption = #39044#25910#27454
          DataBinding.FieldName = 'bamount'
          PropertiesClassName = 'TcxCurrencyEditProperties'
          Properties.AssignedValues.DisplayFormat = True
          Properties.ReadOnly = True
          Width = 60
        end
        object SuramtViewbaledamt: TcxGridDBColumn
          Caption = #24050#32467#31639
          DataBinding.FieldName = 'baledamt'
          PropertiesClassName = 'TcxCurrencyEditProperties'
          Properties.AssignedValues.DisplayFormat = True
          Properties.ReadOnly = True
          Width = 60
        end
        object SuramtViewneedbalamt: TcxGridDBColumn
          Caption = #26410#32467#31639
          DataBinding.FieldName = 'needbalamt'
          PropertiesClassName = 'TcxCurrencyEditProperties'
          Properties.AssignedValues.DisplayFormat = True
          Properties.ReadOnly = True
          Width = 60
        end
        object SuramtViewm_remark: TcxGridDBColumn
          Caption = #22791#27880
          DataBinding.FieldName = 'm_remark'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 120
        end
        object SuramtViewm_custom1: TcxGridDBColumn
          Caption = #33258#23450#20041'1'
          DataBinding.FieldName = 'm_custom1'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 100
        end
        object SuramtViewm_custom2: TcxGridDBColumn
          Caption = #33258#23450#20041'2'
          DataBinding.FieldName = 'm_custom2'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 100
        end
        object SuramtViewm_custom3: TcxGridDBColumn
          Caption = #33258#23450#20041'3'
          DataBinding.FieldName = 'm_custom3'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 100
        end
        object SuramtViewm_custom4: TcxGridDBColumn
          Caption = #33258#23450#20041'4'
          DataBinding.FieldName = 'm_custom4'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 100
        end
        object SuramtViewm_custom5: TcxGridDBColumn
          Caption = #33258#23450#20041'5'
          DataBinding.FieldName = 'm_custom5'
          PropertiesClassName = 'TcxTextEditProperties'
          Properties.ReadOnly = True
          Width = 100
        end
      end
      object RelationLevel: TcxGridLevel
        GridView = RelationView
      end
      object SuramtLevel: TcxGridLevel
        GridView = SuramtView
      end
    end
    object pnlDetail: TPanel
      Left = 0
      Top = 0
      Width = 240
      Height = 313
      Align = alLeft
      BevelOuter = bvNone
      Caption = 'pnlDetail'
      TabOrder = 1
      object cxGrid1: TcxGrid
        Left = 0
        Top = 168
        Width = 240
        Height = 145
        Align = alClient
        TabOrder = 0
        object P_View: TcxGridDBTableView
          Navigator.Buttons.CustomButtons = <>
          OnCellClick = P_ViewCellClick
          DataController.DataModeController.GridMode = True
          DataController.DataModeController.SmartRefresh = True
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsData.Deleting = False
          OptionsData.DeletingConfirmation = False
          OptionsData.Editing = False
          OptionsData.Inserting = False
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          object P_ViewP_Name: TcxGridDBColumn
            Caption = #36135#21697
            DataBinding.FieldName = 'p_name'
            PropertiesClassName = 'TcxTextEditProperties'
            Properties.ReadOnly = True
            HeaderAlignmentHorz = taCenter
            Width = 80
          end
          object P_ViewUnitName: TcxGridDBColumn
            Caption = #21333#20301
            DataBinding.FieldName = 'unitname'
            PropertiesClassName = 'TcxTextEditProperties'
            Properties.ReadOnly = True
            HeaderAlignmentHorz = taCenter
            Width = 30
          end
          object P_ViewQuantity: TcxGridDBColumn
            Caption = #25968#37327
            DataBinding.FieldName = 'quantity'
            PropertiesClassName = 'TcxCurrencyEditProperties'
            Properties.AssignedValues.DisplayFormat = True
            Properties.DecimalPlaces = 4
            Properties.ReadOnly = True
            HeaderAlignmentHorz = taCenter
            Width = 60
          end
        end
        object P_Level: TcxGridLevel
          GridView = P_View
        end
      end
      object grdMst: TcxGrid
        Left = 0
        Top = 0
        Width = 240
        Height = 160
        Align = alTop
        TabOrder = 1
        object Mst_View: TcxGridDBTableView
          Navigator.Buttons.CustomButtons = <>
          OnCellClick = Mst_ViewCellClick
          DataController.DataModeController.GridMode = True
          DataController.DataModeController.SmartRefresh = True
          DataController.Summary.DefaultGroupSummaryItems = <>
          DataController.Summary.FooterSummaryItems = <>
          DataController.Summary.SummaryGroups = <>
          OptionsView.ColumnAutoWidth = True
          OptionsView.GroupByBox = False
          Styles.Background = MainDM.bslBackGroup
          Styles.ContentEven = MainDM.bsEven
          Styles.ContentOdd = MainDM.bsOdd
          Styles.Group = MainDM.bsTitle
          Styles.Header = MainDM.bsTitle
          Styles.Selection = MainDM.bsSelect
          object Mst_Viewp_name: TcxGridDBColumn
            Caption = #36135#21697
            DataBinding.FieldName = 'p_name'
            PropertiesClassName = 'TcxTextEditProperties'
            Properties.ReadOnly = True
            HeaderAlignmentHorz = taCenter
          end
          object Mst_Viewunitname: TcxGridDBColumn
            Caption = #21333#20301
            DataBinding.FieldName = 'unitname'
            PropertiesClassName = 'TcxTextEditProperties'
            Properties.ReadOnly = True
            HeaderAlignmentHorz = taCenter
            Width = 30
          end
          object Mst_Viewquantity: TcxGridDBColumn
            Caption = #25968#37327
            DataBinding.FieldName = 'quantity'
            PropertiesClassName = 'TcxCurrencyEditProperties'
            Properties.AssignedValues.DisplayFormat = True
            Properties.DecimalPlaces = 4
            Properties.ReadOnly = True
            HeaderAlignmentHorz = taCenter
            Width = 60
          end
        end
        object Mst_Level: TcxGridLevel
          GridView = Mst_View
        end
      end
      object splMst: TcxSplitter
        Left = 0
        Top = 160
        Width = 240
        Height = 8
        HotZoneClassName = 'TcxXPTaskBarStyle'
        AlignSplitter = salTop
        Control = grdMst
      end
    end
    object splDetail: TcxSplitter
      Left = 240
      Top = 0
      Width = 8
      Height = 313
      HotZoneClassName = 'TcxXPTaskBarStyle'
      Control = pnlDetail
    end
  end
  object qryRelation: TUniQuery
    Connection = MainDM.UniConn
    SQL.Strings = (
      
        'select b.*,p.name,u.unitname from f_billdtl('#39'2010-01-01'#39','#39'9999-1' +
        '2-31'#39',-99,-99,-99) b'
      '  left join td_product p on b.productid=p.p_id'
      '  left join td_unitprice u on b.unitid=u.unitid')
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 280
    Top = 89
    object qryRelationchoice: TBooleanField
      FieldName = 'choice'
    end
    object qryRelationbtype: TIntegerField
      FieldName = 'btype'
    end
    object qryRelationbname: TStringField
      FieldName = 'bname'
      Size = 30
    end
    object qryRelationbid: TIntegerField
      FieldName = 'bid'
    end
    object qryRelationm_bcode: TStringField
      FieldName = 'm_bcode'
      Size = 30
    end
    object qryRelationm_bdate: TDateTimeField
      FieldName = 'm_bdate'
    end
    object qryRelationm_bkind: TByteField
      FieldName = 'm_bkind'
    end
    object qryRelationm_bstate: TByteField
      FieldName = 'm_bstate'
    end
    object qryRelationm_deptid: TIntegerField
      FieldName = 'm_deptid'
    end
    object qryRelationm_empid: TIntegerField
      FieldName = 'm_empid'
    end
    object qryRelationm_create_by: TIntegerField
      FieldName = 'm_create_by'
    end
    object qryRelationm_check_by: TIntegerField
      FieldName = 'm_check_by'
    end
    object qryRelationm_filid: TIntegerField
      FieldName = 'm_filid'
    end
    object qryRelationm_relationcount: TByteField
      FieldName = 'm_relationcount'
    end
    object qryRelationm_amount: TFloatField
      FieldName = 'm_amount'
    end
    object qryRelationm_remark: TStringField
      FieldName = 'm_remark'
      Size = 200
    end
    object qryRelationproductid: TIntegerField
      FieldName = 'productid'
    end
    object qryRelationunitid: TIntegerField
      FieldName = 'unitid'
    end
    object qryRelationquantity: TFloatField
      FieldName = 'quantity'
    end
    object qryRelationexplan: TStringField
      FieldName = 'explan'
      Size = 200
    end
    object qryRelationname: TWideStringField
      FieldName = 'name'
      Size = 60
    end
    object qryRelationunitname: TWideStringField
      FieldName = 'unitname'
      Size = 30
    end
    object qryRelationamount: TFloatField
      FieldName = 'amount'
    end
  end
  object dsRelation: TDataSource
    DataSet = qryRelation
    Left = 296
    Top = 141
  end
  object dsSuramt: TDataSource
    DataSet = qrySuramt
    Left = 256
    Top = 241
  end
  object qrySuramt: TUniQuery
    Connection = MainDM.UniConn
    CachedUpdates = True
    Options.SetFieldsReadOnly = False
    Options.RequiredFields = False
    Options.QueryRecCount = True
    Left = 240
    Top = 193
  end
end
